<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.17"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>QuEST: DiagonalOp Struct Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand"><img alt="Logo" src="logo.png"/></a>
                    <a class="navbar-brand"><b>QuEST</b> v3.2.0<br>The Quantum Exact Simulation Toolkit</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">DiagonalOp Struct Reference<div class="ingroups"><a class="el" href="group__type.html">Data structures</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents a diagonal complex operator on the full Hilbert state of a <code><a class="el" href="structQureg.html" title="Represents a system of qubits.">Qureg</a></code>.  
 <a href="structDiagonalOp.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="QuEST_8h_source.html">QuEST.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:aa91713a22c95a383bba55e56c4a4e37a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDiagonalOp.html#aa91713a22c95a383bba55e56c4a4e37a">chunkId</a></td></tr>
<tr class="memdesc:aa91713a22c95a383bba55e56c4a4e37a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The position of the chunk of the operator held by this process in the full operator.  <a href="structDiagonalOp.html#aa91713a22c95a383bba55e56c4a4e37a">More...</a><br /></td></tr>
<tr class="separator:aa91713a22c95a383bba55e56c4a4e37a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebb8af156861c4bc0dd4f35f6982570a"><td class="memItemLeft" align="right" valign="top">ComplexArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDiagonalOp.html#aebb8af156861c4bc0dd4f35f6982570a">deviceOperator</a></td></tr>
<tr class="memdesc:aebb8af156861c4bc0dd4f35f6982570a"><td class="mdescLeft">&#160;</td><td class="mdescRight">A copy of the elements stored persistently on the GPU.  <a href="structDiagonalOp.html#aebb8af156861c4bc0dd4f35f6982570a">More...</a><br /></td></tr>
<tr class="separator:aebb8af156861c4bc0dd4f35f6982570a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85c3f52533efe831bbe40b9a48602388"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDiagonalOp.html#a85c3f52533efe831bbe40b9a48602388">imag</a></td></tr>
<tr class="memdesc:a85c3f52533efe831bbe40b9a48602388"><td class="mdescLeft">&#160;</td><td class="mdescRight">The imaginary values of the 2^numQubits complex elements.  <a href="structDiagonalOp.html#a85c3f52533efe831bbe40b9a48602388">More...</a><br /></td></tr>
<tr class="separator:a85c3f52533efe831bbe40b9a48602388"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada3bffa8e414f883e415dd74e46cd879"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDiagonalOp.html#ada3bffa8e414f883e415dd74e46cd879">numChunks</a></td></tr>
<tr class="memdesc:ada3bffa8e414f883e415dd74e46cd879"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of nodes between which the elements of this operator are split.  <a href="structDiagonalOp.html#ada3bffa8e414f883e415dd74e46cd879">More...</a><br /></td></tr>
<tr class="separator:ada3bffa8e414f883e415dd74e46cd879"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c6eab631ef48b4978db026c98180eee"><td class="memItemLeft" align="right" valign="top">long long int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDiagonalOp.html#a2c6eab631ef48b4978db026c98180eee">numElemsPerChunk</a></td></tr>
<tr class="memdesc:a2c6eab631ef48b4978db026c98180eee"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of the 2^numQubits amplitudes stored on each distributed node.  <a href="structDiagonalOp.html#a2c6eab631ef48b4978db026c98180eee">More...</a><br /></td></tr>
<tr class="separator:a2c6eab631ef48b4978db026c98180eee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5131eeb67aafb4c19ac98270c3266742"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDiagonalOp.html#a5131eeb67aafb4c19ac98270c3266742">numQubits</a></td></tr>
<tr class="memdesc:a5131eeb67aafb4c19ac98270c3266742"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of qubits this operator can act on (informing its size)  <a href="structDiagonalOp.html#a5131eeb67aafb4c19ac98270c3266742">More...</a><br /></td></tr>
<tr class="separator:a5131eeb67aafb4c19ac98270c3266742"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d66088bed235d524cd452b107694d5c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDiagonalOp.html#a1d66088bed235d524cd452b107694d5c">real</a></td></tr>
<tr class="memdesc:a1d66088bed235d524cd452b107694d5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The real values of the 2^numQubits complex elements.  <a href="structDiagonalOp.html#a1d66088bed235d524cd452b107694d5c">More...</a><br /></td></tr>
<tr class="separator:a1d66088bed235d524cd452b107694d5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents a diagonal complex operator on the full Hilbert state of a <code><a class="el" href="structQureg.html" title="Represents a system of qubits.">Qureg</a></code>. </p>
<p>The operator need not be unitary nor Hermitian (which would constrain it to real values)</p>
<dl class="section author"><dt>Author</dt><dd>Tyson Jones </dd></dl>

<p class="definition">Definition at line <a class="el" href="QuEST_8h_source.html#l00178">178</a> of file <a class="el" href="QuEST_8h_source.html">QuEST.h</a>.</p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="aa91713a22c95a383bba55e56c4a4e37a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa91713a22c95a383bba55e56c4a4e37a">&#9670;&nbsp;</a></span>chunkId</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int DiagonalOp::chunkId</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The position of the chunk of the operator held by this process in the full operator. </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8h_source.html#l00187">187</a> of file <a class="el" href="QuEST_8h_source.html">QuEST.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="QuEST__cpu_8c_source.html#l01335">agnostic_createDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03842">agnostic_setDiagonalOpElems()</a>, and <a class="el" href="test__data__structures_8cpp_source.html#l00190">TEST_CASE()</a>.</p>

</div>
</div>
<a id="aebb8af156861c4bc0dd4f35f6982570a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebb8af156861c4bc0dd4f35f6982570a">&#9670;&nbsp;</a></span>deviceOperator</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ComplexArray DiagonalOp::deviceOperator</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A copy of the elements stored persistently on the GPU. </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8h_source.html#l00193">193</a> of file <a class="el" href="QuEST_8h_source.html">QuEST.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="QuEST__gpu_8cu_source.html#l00338">agnostic_createDiagonalOp()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l00375">agnostic_destroyDiagonalOp()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l03233">agnostic_setDiagonalOpElems()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l00382">agnostic_syncDiagonalOp()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l02947">densmatr_applyDiagonalOpKernel()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l03142">densmatr_calcExpecDiagonalOp()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l02917">statevec_applyDiagonalOpKernel()</a>, and <a class="el" href="QuEST__gpu_8cu_source.html#l03006">statevec_calcExpecDiagonalOp()</a>.</p>

</div>
</div>
<a id="a85c3f52533efe831bbe40b9a48602388"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85c3f52533efe831bbe40b9a48602388">&#9670;&nbsp;</a></span>imag</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>* DiagonalOp::imag</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The imaginary values of the 2^numQubits complex elements. </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8h_source.html#l00191">191</a> of file <a class="el" href="QuEST_8h_source.html">QuEST.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="QuEST__cpu_8c_source.html#l01335">agnostic_createDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l01357">agnostic_destroyDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03842">agnostic_setDiagonalOpElems()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l00382">agnostic_syncDiagonalOp()</a>, <a class="el" href="QuEST__cpu__distributed_8c_source.html#l01482">copyDiagOpIntoMatrixPairState()</a>, <a class="el" href="QuEST__cpu__local_8c_source.html#l00325">densmatr_applyDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03781">densmatr_calcExpecDiagonalOpLocal()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03661">statevec_applyDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03738">statevec_calcExpecDiagonalOpLocal()</a>, <a class="el" href="test__calculations_8cpp_source.html#l00111">TEST_CASE()</a>, <a class="el" href="utilities_8cpp_source.html#l00980">toQVector()</a>, and <a class="el" href="QuEST__validation_8c_source.html#l00673">validateDiagOpInit()</a>.</p>

</div>
</div>
<a id="ada3bffa8e414f883e415dd74e46cd879"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada3bffa8e414f883e415dd74e46cd879">&#9670;&nbsp;</a></span>numChunks</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int DiagonalOp::numChunks</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The number of nodes between which the elements of this operator are split. </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8h_source.html#l00185">185</a> of file <a class="el" href="QuEST_8h_source.html">QuEST.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="QuEST__cpu_8c_source.html#l01335">agnostic_createDiagonalOp()</a>, and <a class="el" href="test__data__structures_8cpp_source.html#l00190">TEST_CASE()</a>.</p>

</div>
</div>
<a id="a2c6eab631ef48b4978db026c98180eee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c6eab631ef48b4978db026c98180eee">&#9670;&nbsp;</a></span>numElemsPerChunk</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long long int DiagonalOp::numElemsPerChunk</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The number of the 2^numQubits amplitudes stored on each distributed node. </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8h_source.html#l00183">183</a> of file <a class="el" href="QuEST_8h_source.html">QuEST.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="QuEST__cpu_8c_source.html#l01335">agnostic_createDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03842">agnostic_setDiagonalOpElems()</a>, <a class="el" href="QuEST__cpu__distributed_8c_source.html#l01482">copyDiagOpIntoMatrixPairState()</a>, <a class="el" href="test__calculations_8cpp_source.html#l00111">TEST_CASE()</a>, and <a class="el" href="utilities_8cpp_source.html#l00980">toQVector()</a>.</p>

</div>
</div>
<a id="a5131eeb67aafb4c19ac98270c3266742"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5131eeb67aafb4c19ac98270c3266742">&#9670;&nbsp;</a></span>numQubits</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int DiagonalOp::numQubits</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The number of qubits this operator can act on (informing its size) </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8h_source.html#l00181">181</a> of file <a class="el" href="QuEST_8h_source.html">QuEST.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="QuEST__cpu_8c_source.html#l01335">agnostic_createDiagonalOp()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l00382">agnostic_syncDiagonalOp()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l02947">densmatr_applyDiagonalOpKernel()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03696">densmatr_applyDiagonalOpLocal()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l03142">densmatr_calcExpecDiagonalOp()</a>, <a class="el" href="QuEST_8c_source.html#l01286">initDiagonalOp()</a>, <a class="el" href="test__data__structures_8cpp_source.html#l00190">TEST_CASE()</a>, <a class="el" href="utilities_8cpp_source.html#l01018">toQMatrix()</a>, <a class="el" href="utilities_8cpp_source.html#l00980">toQVector()</a>, <a class="el" href="QuEST__validation_8c_source.html#l00677">validateDiagonalOp()</a>, and <a class="el" href="QuEST__validation_8c_source.html#l00357">validateNumElems()</a>.</p>

</div>
</div>
<a id="a1d66088bed235d524cd452b107694d5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d66088bed235d524cd452b107694d5c">&#9670;&nbsp;</a></span>real</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>* DiagonalOp::real</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The real values of the 2^numQubits complex elements. </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8h_source.html#l00189">189</a> of file <a class="el" href="QuEST_8h_source.html">QuEST.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="QuEST__cpu_8c_source.html#l01335">agnostic_createDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l01357">agnostic_destroyDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03842">agnostic_setDiagonalOpElems()</a>, <a class="el" href="QuEST__gpu_8cu_source.html#l00382">agnostic_syncDiagonalOp()</a>, <a class="el" href="QuEST__cpu__distributed_8c_source.html#l01482">copyDiagOpIntoMatrixPairState()</a>, <a class="el" href="QuEST__cpu__local_8c_source.html#l00325">densmatr_applyDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03781">densmatr_calcExpecDiagonalOpLocal()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03661">statevec_applyDiagonalOp()</a>, <a class="el" href="QuEST__cpu_8c_source.html#l03738">statevec_calcExpecDiagonalOpLocal()</a>, <a class="el" href="test__calculations_8cpp_source.html#l00111">TEST_CASE()</a>, <a class="el" href="utilities_8cpp_source.html#l00980">toQVector()</a>, and <a class="el" href="QuEST__validation_8c_source.html#l00673">validateDiagOpInit()</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="QuEST_8h_source.html">QuEST.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
</body>
        <script type="text/javascript" src="boot.js"></script>
</html>
